package com.stone.sys.pojo;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * SYS_ORGAN entity. @author MyEclipse Persistence Tools
 */

@Entity
@Table(name = "SYS_ROLE")
public class TRole implements java.io.Serializable {

	 //Fields
    private Long id;

    private String name;
    private String notes;
    private String nameen;
    
  //  private boolean readonly;
    
  //  private Set<TUser> users = new HashSet<TUser>(0);
    
    @Id
    @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="SEQ_ROLE")
    @SequenceGenerator(name="SEQ_ROLE",allocationSize=1, sequenceName="SEQ_ROLE")
	public Long getId() {
		return id;
	}
    
	public void setId(Long id) {
		this.id = id;
	}
	public String getName() {
		return name == null ? "" : name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getNotes() {
		return notes;
	}

	public void setNotes(String notes) {
		this.notes = notes;
	}
//
//	public String getRolecode() {
//		return rolecode;
//	}
//
//	public void setRolecode(String rolecode) {
//		this.rolecode = rolecode;
//	}
//
//	public Integer getRolelevel() {
//		return rolelevel;
//	}
//
//	public void setRolelevel(Integer rolelevel) {
//		this.rolelevel = rolelevel;
//	}

	public String getNameen() {
		return nameen;
	}

	public void setNameen(String nameen) {
		this.nameen = nameen;
	}


	
//    @ManyToMany(cascade =  {
//        CascadeType.PERSIST, CascadeType.MERGE}
//    , fetch = FetchType.LAZY)
//    @JoinTable(name = "SYS_USER_ROLE", joinColumns =  {
//        @JoinColumn(name = "ROLE_ID")
//    }
//    , inverseJoinColumns =  {
//        @JoinColumn(name = "USER_ID")
//    }
//    )
//    public Set<TUser> getUsers() {
//        return users;
//    }
//
//    /** * @param users users. */
//    public void setUsers(Set<TUser> users) {
//        this.users = users;
//    }
	
	
	
}